/* Startup Template For RB Port Change */ // Sample Interrupt Handler void interrupt() { // RB Port Change Interrupt if(PIR1.RBIF == 1) // if the RB Port Change Interrupt flag is set... { x = PORTB; // Need to read or write to the port to clear mismatch condition - Place Your Code Here - PIR1.RBIF = 0; } } // Sample Main Setup void main() { // Set Interrupt Enable bits INTCON.RBIE = 1; // bit 3 RB Port Change Interrupt Enable INTCON.GIE = 1; // set global Interrupt Enable bits while(1) // endless loop { - Place Your Code Here - } }